package com.easylive.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: yudaxian
 * @DateTime: 2024/11/9 9:43
 **/
@Getter
@AllArgsConstructor
public enum VideoStatusEnum {
    STATUS0(0, "转码中"),
    STATUS1(1, "转码失败"),
    STATUS2(2, "审核中"),
    STATUS3(3, "审核通过"),
    STATUS4(4, "审核不通过"),
    ;

    private Integer status;

    private String desc;

    public static VideoStatusEnum getByStatus(Integer status) {
        for (VideoStatusEnum videoStatusEnum : VideoStatusEnum.values()) {
            if (videoStatusEnum.getStatus().equals(status)) {
                return videoStatusEnum;
            }
        }
        return null;
    }
}
